
filePrefix = 'data/';

rr = zeros(5,5);
for nbCities = 250:250:3000
count = zeros(10,10);
for i = 1:10
        fileP = strcat(filePrefix,num2str(nbCities),'/',num2str(i),'/');
        for j = 1:10
    
           file = strcat(fileP,'Result',num2str(j),'.dat');
           result =csvread(file);
           
           count(i,j) = result;
        end      
end
resFile = strcat('result/',num2str(nbCities),'/');
mkdir(resFile);
csvwrite( strcat(resFile,'result.dat'),count);

end
% 

% hold on;
% h =   plot(rr(1,:),rr(5,:),'-','LineWidth',1,...
%     'Color','black');
% 
% 
% 
% plot(rr(1,:),rr(3,:),'-ro','LineWidth',2,...
%     'MarkerFaceColor',[0.8 0 0],...
%     'MarkerSize',10);
% 
% 
% 
% % a =  get(h,'Parent');
% % axis(a,[50 250 0 80]); 
% 
% xlabel('Liczba miast');
% ylabel('Liczba drog jednokierunkowych');
% legend('Maksimum','Mediana',...
%     'Location','NorthEastOutside');
% 
% print('-depsc2','contsOnedirections')
